首页> 外文OA文献 >On the Relation between Context-Free Grammars and Parsing Expression Grammars
【2h】

On the Relation between Context-Free Grammars and Parsing Expression Grammars

机译:论无上下文语法与解析表达的关系   文法

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Context-Free Grammars (CFGs) and Parsing Expression Grammars (PEGs) haveseveral similarities and a few differences in both their syntax and semantics,but they are usually presented through formalisms that hinder a propercomparison. In this paper we present a new formalism for CFGs that highlightsthe similarities and differences between them. The new formalism borrows fromPEGs the use of parsing expressions and the recognition-based semantics. Weshow how one way of removing non-determinism from this formalism yields aformalism with the semantics of PEGs. We also prove, based on these newformalisms, how LL(1) grammars define the same language whether interpreted asCFGs or as PEGs, and also show how strong-LL(k), right-linear, and LL-regulargrammars have simple language-preserving translations from CFGs to PEGs.
机译:上下文无关文法(CFG)和语法分析表达文法(PEG)在语法和语义上有许多相似之处,并且有一些区别,但是它们通常是通过形式化的形式呈现的,这妨碍了适当的比较。在本文中,我们为CFG提供了一种新的形式主义,强调了它们之间的异同。新的形式主义从PEG借用了解析表达式和基于识别的语义的使用。我们展示了从这种形式主义中消除不确定性的一种方式如何产生具有PEG语义的形式主义。基于这些新形式主义,我们还证明LL(1)语法如何定义相同的语言,无论是解释为CFG还是PEG,并且还显示出强LL(k),右线性和LL正则语法如何简单地保留语言从CFG到PEG的翻译。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号